1. Field of Invention
The invention relates to a video playing device and a control method thereof, and, in particular, to a digital video playing device and a control method for setting a playing environment such that digital video data can be displayed in real time.
2. Related Art
As a digital video system processes a lot of video data, the video data is compressed in order to facilitate the transmission. When the compressed video data is played on a display device of the digital video system, the compressed video data must be decompressed by a video player of the digital video system and then the video data is transferred to the display device for displaying.
In order to match with the television (TV) specification, the digital video data may be converted into a full picture by way of progressive scan or interlaced scan. The progressive scan means that a full frame is depicted in the order from top to bottom. For example, the VCD system performs the compression and decompression by using this scanning method in conjunction with the MPEG-1 specification. The interlaced scan is to divide a full frame into an odd field and an even field, and the odd field and the even field are respectively depicted in the order from top to bottom. For example, the DVD system performs the compression and decompression by using this scanning method in conjunction with the MPEG-2 specification. However, the resolution of the interlaced scan is lower than that of the progressive scan. In order to solve this problem, the resolution of the played video may be increased by de-interlacing the interlaced video data.
Referring to FIG. 1, a conventional video player 1 includes a decoder 11, a buffer 12, a controller 13 and a TV encoder 14. After the compressed video data is transferred to the decoder 11, the video data recovered by the decoder 11 reproduces a frame (or a field) stored in one of regions 121 to 12n in the buffer 12. The controller 13 executes a video setting process 131 to generate a setting parameter including a size of the frame (or field) to be encoded by the TV encoder 14, a scanning method (a progressive scan or an interlaced scan), whether the de-interlaced scan is needed, and the frame (or field) in which one of the regions 121 to 12n has to be read for encoding. In addition, the TV encoder 14 regularly generates a vertical sync (VSYNC) signal and a horizontal sync (HSYNC) signal, and reads the frame (or field) for encoding from a prescribed one of the regions 121 to 12n according to the video setting parameter. That is, the VSYNC signal and the HSYNC signal are simultaneously combined into a video signal 141. Thereafter, the TV encoder 14 outputs the video signal 141 for displaying the video data.
However, if the video setting process 131 generates and transfers the setting parameter to the TV encoder 14 in advance, and the decoder 11 does not decompress the corresponding frame, the TV encoder 14 might generate an incorrect video signal 141. In other words, if the video setting process 131 generates and transfers the setting parameter to the TV encoder 14 laggardly, and the decoder 11 has decompressed the subsequent frame, the TV encoder 14 might generate the incorrect video signal 141. In both of the conditions, the display might display an incorrect picture. In order to avoid displaying such incorrect pictures, the controller 13 should complete the video setting process 131 and generate the corresponding setting parameters at the time when the frame has been decoded but not encoded by the TV encoder 1. Therefore, the TV encoder 14 can generate the correctly encoded video signal 141 and the video can be played correctly.